.global prints

.text
# expects a pointer to the string in $g0
prints:
	subi $sp $sp 1
	st $ra $sp

	ld $t0 $g0
	eqi $t1 $t0 0
	ji $t1 done

	wr $t0 1
	addi $g0 $g0 1
	cali $sp prints

	done:
	ld $ra $sp
	addi $sp $sp 1
	j $sp $ra

